{{#accordion-list-item
     title=(t 'formScheduling.title')
     detail=(t 'formScheduling.detail' appName=settings.appName)
     expandAll=expandAll
     expand=(action expandFn)
}}
  {{#if editing}}
    {{#if canRequestHost}}
      <div class="radio mb-0">
        <label>{{radio-button selection=isRequestedHost value=true}}
          {{t 'formScheduling.canRequestHost.containers' htmlSafe=true}}
        </label>
          {{#if isRequestedHost}}
            <div class="mb-10 mt-10">
              {{searchable-select
                class="form-control"
                content=hostChoices
                value=requestedHostId
                optionValuePath="id"
                optionLabelPath="name"
                disabled=(not isRequestedHost)
                style="display: inline-block; width: auto;"
              }}
            </div>
          {{/if}}
      </div>

      <div class="radio mb-0">
        <label>{{radio-button selection=isRequestedHost value=false}}
          {{#if isGlobal}}
            {{t 'formScheduling.autoRun'}}
          {{else}}
            {{t 'formScheduling.autoPick.container'}}
          {{/if~}}
        </label>
      </div>
    {{else}}
      {{#if isGlobal}}
        <label class="acc-label">{{t 'formScheduling.autoRun'}}</label>
      {{else}}
        <label class="acc-label">{{t 'formScheduling.autoPick.container'}}</label>
      {{/if~}}
    {{/if}}
  {{else if isGlobal}}
    <label class="acc-label">{{t 'formScheduling.autoRun'}}</label>
  {{else if requestedHostId}}
    <div class="row">
      <label>
        {{t 'formScheduling.canRequestHost.containers' htmlSafe=true}}
      </label>
      <span class="form-static-control">{{selectedChoice.name}}</span>
    </div>
  {{else}}
    <p>{{t 'formScheduling.autoPick.container'}}</p>
  {{/if}}

  {{#unless isRequestedHost}}
    <div class="row">
      <div class="col span-6 box">
        {{node-selector editing=editing title="formScheduling.nodeSelector.requireAll" rules=scheduling.node.requireAll}}
      </div>
      <div class="col span-6 box">
        {{node-selector editing=editing title="formScheduling.nodeSelector.requireAny" rules=scheduling.node.requireAny}}
      </div>
    </div>
    <div class="row">
      <div class="col span-6 box">
        {{node-selector editing=editing title="formScheduling.nodeSelector.preferred" rules=scheduling.node.preferred}}
      </div>
    </div>
    {{#advanced-section advanced=advanced}}
      <div class="row">
        <div class="col span-12 box">
          {{scheduling-toleration editing=editing tolerate=scheduling.tolerate}}
        </div>
      </div>
      <div class="row">
        <div class="col span-4 box">
          <label class="acc-label">{{t 'formScheduling.scheduler.label'}}</label>
          {{#input-or-display editable=editing value=scheduling.scheduler}}
            {{input type="text" classNames="form-control" value=scheduling.scheduler placeholder=(t 'formScheduling.scheduler.placeholder')}}
          {{/input-or-display}}
        </div>
        <div class="col span-4 box">
          <label class="acc-label">{{t 'formScheduling.priority.label'}}</label>
          {{#input-or-display editable=editing value=scheduling.priority}}
            {{input-integer min="1" step="1" value=scheduling.priority classNames="form-control" placeholder=(t 'formScheduling.priority.placeholder')}}
          {{/input-or-display}}
        </div>
        <div class="col span-4 box">
          <label class="acc-label">{{t 'formScheduling.priorityClassName.label'}}</label>
          {{#input-or-display editable=editing value=scheduling.priorityClassName}}
            {{input type="text" classNames="form-control" value=scheduling.priorityClassName placeholder=(t 'formScheduling.priorityClassName.placeholder')}}
          {{/input-or-display}}
        </div>
      </div>
    {{/advanced-section}}
  {{/unless}}
{{/accordion-list-item}}
